﻿using System;
using System.Collections.Generic;


namespace Scrobbler
{
    internal class CScrobblerInfo:IScrobblerInfo
    {
        internal CScrobblerInfo(List<string> ResponseArray)
        {
            m_ResponseArray = ResponseArray;
        }

        private List<string> m_ResponseArray;

        #region IScrobblerInstance Members

        public string Status
        {
            get { return m_ResponseArray[0]; }
        }

        public string SessionID
        {
            get { return m_ResponseArray[1]; }
        }

        public string NowPlayingURL
        {
            get
            {
                if (m_ResponseArray[0] != "OK")
                    throw new Exception("Lastfm error: " + m_ResponseArray[0]);
                return m_ResponseArray[2];
                
            }
        }

        public string SubmissionURL
        {
            get { return m_ResponseArray[3]; }
        }

        #endregion
    }
}
